1. Field of the Invention
The present invention relates to an image pickup apparatus having an image pickup element that includes pixels used as both focus detection pixels and image pickup pixels.
2. Description of the Related Art
Recently, an image pickup apparatus such as a digital still camera or a digital video camera that includes an image pickup element such as a CCD image sensor or a CMOS image sensor is widely used. When an object is taken as a moving image under a fluorescent light illumination, a phenomenon of a so-called flicker of the fluorescent light occurs. In other words, when an image is taken by using the image pickup element having rolling shutter characteristics under the illumination of the fluorescent light that is directly turned on by a commercial alternating-current power supply, a flicker of luminance, a so-called flicker of the fluorescent light, is generated in a time direction for each image.
Japanese Patent Laid-Open No. 2009-17213 discloses a method of integrating an output of the CMOS image sensor in a horizontal direction to obtain a vertical intensity distribution to calculate a flicker component in a vertical direction of a current frame based on the vertical intensity distribution of a plurality of frames. In Japanese Patent Laid-Open No. 2009-17213, an original image (an uncorrected shot image) is corrected by calculating a correction gain value based on the calculated flicker component and multiplying a correction coefficient by a video signal of the current frame.
Japanese Patent Laid-Open No. 2000-292686 discloses a method of dividing a light receiving unit of a part of pixels of an image pickup element into two to provide a pupil division function and then arranging focus detection pixels between imaging pixels at predetermined intervals to perform focus detection using a phase difference method. Japanese Patent Laid-Open No. 2007-282108 discloses not only a configuration in which a part of the image pickup areas of the image pickup element is used as focus detection pixels, but also a configuration in which an image pickup signal is generated by adding the focus detection pixels. Japanese Patent Laid-Open No. 2009-38666 discloses a method of correcting fluorescent light. Japanese Patent Laid-Open No. 2009-81684 discloses a method of performing the smoothing in order to reduce an influence by a motion of an object to suppress the influence of the motion of the object and generating a sine wave to be a correction gain of the flicker.
When the image pickup element that includes pixels that have functions as a focus detection pixel and an imaging pixel is used, the flicker of the fluorescent light also influences the focus detection pixel. Since the flicker of the fluorescent light generates luminous unevenness in a vertical direction, the bright and dark area also appears in two line images obtained by pupil division performed by collecting only signals from the focus detection pixels for which the pupil division have been performed up and down (A+B image, and C+D image), and therefore an image shift, i.e. a defocus amount, cannot be calculated precisely.
In Japanese Patent Laid-Open No. 2009-38666, an incorrect flicker correction gain value is calculated in correcting the flicker of the fluorescent light if a flicker component contains a variation component other than the flicker component such as the motion of the object. In Japanese Patent Laid-Open No. 2009-81684, a sine wave is generated to be a correction gain of the flicker, but a rest of correction or a excessive correction occurs since light emitting characteristics of the fluorescent light are distorted by rectification characteristics of the alternating-current power supply, a deterioration of a fluorescent material, or the like. Such a phenomenon may also be generated when the flicker detection or the flicker correction is performed after the pupil division.